package com.cc.crm.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;


/**
 * @program:
 * @ClassName:
 * @description:
 * @author: zgc
 * @date:
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo {
    public Integer id;
    @NotBlank(message = "账号不能为空")
    @Pattern(regexp = "^[0-9|a-z|A-Z|\u4e00-\u9fa5]{3,20}$",message = "账号格式不正确，应该为3-20个字符")
    public String account;
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^[0-9|a-z|A-Z]{6,20}$",message = "密码格式不正确，应该为6-20个大小写字母或数字")
    public String password;
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = "^[0-9]{11}$",message = "电话格式不正确，应该为11位数字")
    public String tel;
    @NotBlank(message = "姓名不能为空")
    @Pattern(regexp = "^[\u4e00-\u9fa5]{2,5}$",message = "姓名格式不正确，应该是3-5个中文字符")
    public String username;
    public String email;
    public Integer usertype;
    public Integer isdelete;
}
